/**
 * Copyright (c) 2013-2016, Jieven. All rights reserved.
 *
 * Licensed under the GPL license: http://www.gnu.org/licenses/gpl.txt
 * To use it on other terms please contact us at 1623736450@qq.com
 */
package com.eova.core.dict;

import com.eova.aop.Aop上下文;
import com.eova.aop.元对象拦截器;
import com.eova.common.utils.高频常用方法集合;
import com.eova.model.MetaObject;

public class 字典拦截器 extends 元对象拦截器 {

	@Override
	public void 查询之前(Aop上下文 ac) throws Exception {
		String objectCode = ac.当前控制器.getPara("query_v_object_code");
		if (!高频常用方法集合.isEmpty(objectCode)) {
			MetaObject o = MetaObject.dao.getByCode(objectCode);
			ac.追加SQL条件 = " and object = ?";
			ac.自定义SQL参数.add(o.getTable());
		}

		super.查询之前(ac);
	}

	
}